﻿#include<cocos2d.h>
USING_NS_CC;
using namespace std;

//牌的枚举
typedef enum {
	//牌型错误
	POKER_TYPE_ERROR,
	//单张
	POKER_TYPE_SINGLE,
	//对子
	POKER_TYPE_DOUBLE,
	//顺子
	POKER_TYPE_STRAIGHT,
	//三张炸弹
	POKER_TYPE_THREE_BOMB,
	//四张炸弹
	POKER_TYPE_FOUR_BOMB,
	//王炸
	POKER_TYPE_KING_BOMB,
	//双红十炸
	POKER_TYPE_REDTEN_BOMB
}PokerType;

class CardGame {
public:
	CardGame();
	bool gameDidBegan;		//游戏是否开始

	//单例
	static CardGame *getInstance();
	static void cleanInstance();

	// 洗牌函数
	void shuffle(int a[], int len);
	char first;
	char red10_fk;
	char red10_hx;

	Node *selfCards_node;//存放自己牌的精灵

	Sprite *getCardSpriteWithValue(int Value);//通过值来获取卡片精灵
	PokerType getPokerTypeWithCards(vector<int> arr);
	//游戏提示功能
	vector<int> suggest(int selfCards[],int selfCardsCount, vector<int> lastCards);
};